<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib uri="/page" prefix="public"%>
<public:pageControl classPath="app.web.visual.tags.TagTree" />
<script>
	function tagTree_onclick(tree, page) {
		if (!tree.treeNode.isParent) {
			page.find("tagTreeFrame").view.url = "tagMain.jsp?" + "tag_typ_id="+ tree.treeNode.nodeID;
		}
	}

	function tagTree_show(tree, page, type) {
		if (type == "add") {
			if (tree.treeNode.level == 0) {
				return true;
			} else {
				return false;
			}
		} else if (type == "edit") {
			if (tree.treeNode.level == 0) {
				return false;
			} else {
				return true;
			}
		} else if (type == "delete") {
			return !tree.treeNode.isParent;
		} else {
			return true;
		}
	}
</script>
